#include "StdAfx.h"
#include "CircuitPic.h"


CCircuitPic::CCircuitPic(void)
{
}

CCircuitPic::CCircuitPic(const CCircuitPic *pEntityObj)
	: CICircuit(pEntityObj)
{

}

CCircuitPic::CCircuitPic(CDevice *pParentEnt)
	: CICircuit(pParentEnt)
{

}

CCircuitPic::~CCircuitPic(void)
{
	Clear();
}

bool CCircuitPic::IsCircuitPic() const
{
	return true;
}

void CCircuitPic::Serialize(CArchive & ar)
{
	CICircuit::Serialize(ar);
}

void CCircuitPic::Clear()
{

}

void CCircuitPic::CopyDisplayObj(long lSourceLayerId, long lDestLayerId)
{
	CICircuit::CopyDisplayObj(lSourceLayerId, lDestLayerId);
}

void CCircuitPic::DeleteDisplayObj(long lLayerId)
{
	CICircuit::DeleteDisplayObj(lLayerId);
}

CDisplayObj *CCircuitPic::CreateDisplayObj(long lLayerId)
{
	CCircuitPicDisObj *pCirPicDis = new CCircuitPicDisObj(this);
	pCirPicDis->SetLayerId(lLayerId);

	return pCirPicDis;
}

bool CCircuitPic::GetPicPath(CString &szPicPath) const
{
	CDevice *pDevice = (CDevice *)GetParentEntity();
	if (!pDevice)
	{
		return false;
	}

	bool bGet = pDevice->GetPathOfCircuit(this, szPicPath);
	if (!bGet)
	{
		return false;
	}

	return true;
}

CObj * CCircuitPic::Clone() const
{
	return new CCircuitPic(this);
}
